<form>
  <div class="view-title">Register instructor</div>
  <div class="input-div"><label >full name:</label><input name="name" type="text" /></div>
  <div class="input-div"><label >birthday:</label><span id="add-instructor-bday" ></span></div>
  <div class="input-div"><label >username:</label><input name="username" type="text" /></div>
  <div class="input-div"><label >password:</label><input name="password" type="password" /></div>
  <input id="add-instructor-button" type="button" value="Register"/>
</form>
<script>
  $('#add-instructor-button').click(function(){
    mesg.clear();
    management.register($('#add-instructor-form').serialize(), function(data){
      if(data.response.success == "true"){
        mesg.notice("Successfully registered instructor");
      }else{
        mesg.error(data.response.errors.toString());
      }
    });
  });
  
  $('#add-instructor-bday').birthdaypicker({
    dateFormat: 'bigEndian'
  });
    
</script>